package com.rc.saas.tenant.service.elec;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.mapper.elec.ElecPileOfflineMapper;
import com.rc.saas.tenant.search.elec.PileOfflineSearch;
import com.rc.saas.tenant.vo.elec.ElecPileOfflineResultVo;
import com.rc.saas.tenant.vo.elec.PileOfflineVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ElecPileOfflineServiceImpl implements ElecPileOfflineService {
    @Autowired
    private ElecPileOfflineMapper elecPileOfflineMapper;

    @Override
    public ElecPileOfflineMapper getMapper() {
        return elecPileOfflineMapper;
    }

    @Override
    public PageInfo<ElecPileOfflineResultVo> listPagePileOfflineDateil(PileOfflineSearch pileOfflineSearch) {
        PageHelper.startPage(pileOfflineSearch.getOffset(),pileOfflineSearch.getLimit());
        List<ElecPileOfflineResultVo> elecPileOfflineResultVoList=elecPileOfflineMapper.listPagePileOfflineDateil(pileOfflineSearch);
        return new PageInfo<>(elecPileOfflineResultVoList);
    }

    @Override
    public List<ElecPileOfflineResultVo> listPileOfflineDetail(PileOfflineSearch pileOfflineSearch) {
        return elecPileOfflineMapper.listPagePileOfflineDateil(pileOfflineSearch);
    }
}
